import request from '../request';

//登录
export function userLogin(data) {
    return request({
        url: '/hjw-auth/oauth2/token?' + 'grant_type=password',
        method: 'post',
        data: data,
        headers: {
            'Authorization': 'Basic aGp3Omhqdw==',
        }
    })
}
//加密
export function publickey() {
    return request({
        url: `hjw-auth/publickey`,
        method: 'get',
    })
}
//权限
export function getmenu(params) {
    return request({
        url: `/hjw-upms/menu`,
        method: 'get',
        params
    })
}
//获取用户信息
export function loginUser(data) {
    return request({
        url: '/hjw-upms/user/info',
        method: 'get',
        params: data
    })
}
//修改密码
export function userRefreshPwd(data) {
    return request({
        url: '/hjw-upms/user/updateCurrentUserPwd',
        method: 'put',
        data
    })
}
//退出登录
export function loginout() {
    return request({
        url: '/hjw-upms/user/loginout',
        method: 'delete'

    })
}
